<template>
  <common-page
    ref="commonPage"
    :bg-path="bgPath"
    page-type="commonPage"
    :web-path="webPath"
    :columns="columns"
    :search-items="searchItems"
    :form-items="formItems"
    :editor-items="editorItems"
  />
</template>
<script>
export default {
  data() {
    return {
      // ===== ===== ===== ===== 全局属性 ===== ===== ===== =====
      // 后台接口路径
      bgPath: 'base/user/user/agent',
      // Web路径
      webPath: 'base/user/user/agent',
      // ===== ===== ===== ===== 页面配置 ===== ===== ===== =====
      // 搜索内容
      searchItems: [
        {
          rowIndex: 1,
          items: [
            {
              code: "code",
              name: "编码",
              span: 6,
              type: "text",
              config: {
                edit: false
              }
            },
            {
              code: "name",
              name: "门店编码",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "stateSign",
              name: "状态标识",
              type: "select",
              span: 6,
              config: {
                edit: false,
                options: [
                  { key: "1", value: "未审核" },
                  { key: "2", value: "已审核" }
                ]
              }
            },
            {
              code: "baseUserCode",
              name: "基础用户编码",
              span: 6,
              type: "text",
              config: {
                edit: false
              }
            },
            {
              code: "baseUserName",
              name: "基础用户名称",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            }
          ]
        }
      ],
      // 列表内容
      columns: [
        {
          code: "code",
          name: "编码",
          span: 6,
          type: "text",
          config: {
            edit: false
          }
        },
        {
          code: "name",
          name: "门店编码",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "contactPhone",
          name: "联系电话",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "contactEmail",
          name: "联系邮箱",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "contactAddress",
          name: "联系地址",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "registerAddress",
          name: "注册地址",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "taxpayerCode",
          name: "纳税人识别号",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "lrName",
          name: "法人名称",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "lrIdcardCode",
          name: "法人身份证号",
          span: 6,
          type: "text",
          config: {
            edit: false
          }
        },
        {
          code: "lrIdcardFront",
          name: "法人身份证正面图",
          type: "oss",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "lrIdcardBack",
          name: "法人身份证背面图",
          type: "oss",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "agreement",
          name: "合作协议图",
          type: "oss",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "paymentVoucher",
          name: "付款凭证图",
          type: "oss",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "agentProvince",
          name: "代理省",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "agentCity",
          name: "代理市",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "agentDistrict",
          name: "代理区",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "accountBank",
          name: "开户行",
          span: 6,
          type: "text",
          config: {
            edit: false
          }
        },
        {
          code: "accountBankCode",
          name: "开户行联行号",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "accountBankAddress",
          name: "开户行所在地",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "accountName",
          name: "银行户名",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "accountCode",
          name: "银行账号",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "stateSign",
          name: "状态标识",
          type: "select",
          span: 6,
          config: {
            edit: false,
            options: [
              { key: "1", value: "未审核" },
              { key: "2", value: "已审核" }
            ]
          }
        },
        {
          code: "baseUserCode",
          name: "基础用户编码",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        },
        {
          code: "baseUserName",
          name: "基础用户名称",
          type: "text",
          span: 6,
          config: {
            edit: false
          }
        }
      ],
      // 增加/修改/详情 表单
      formItems: [
        {
          rowIndex: 1,
          items: [
            {
              code: "code",
              name: "编码",
              span: 6,
              type: "text",
              config: {
                edit: false,
                rules: [
                  { required: true, message: '请输入编码', trigger: 'blur' }
                ]
              }
            },
            {
              code: "name",
              name: "名称",
              type: "text",
              span: 6,
              config: {
                edit: false,
                rules: [
                  { required: true, message: '请输入名称', trigger: 'blur' }
                ]
              }
            },
            {
              code: "contactPhone",
              name: "联系电话",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "contactEmail",
              name: "联系邮箱",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "contactAddress",
              name: "联系地址",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "registerAddress",
              name: "注册地址",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "taxpayerCode",
              name: "纳税人识别号",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "lrName",
              name: "法人名称",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "lrIdcardCode",
              name: "法人身份证号",
              span: 6,
              type: "text",
              config: {
                edit: false
              }
            },
            {
              code: "lrIdcardFront",
              name: "法人身份证正面图",
              type: "oss",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "lrIdcardBack",
              name: "法人身份证背面图",
              type: "oss",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "agreement",
              name: "合作协议图",
              type: "oss",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "paymentVoucher",
              name: "付款凭证图",
              type: "oss",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "agentProvince",
              name: "代理省",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "agentCity",
              name: "代理市",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "agentDistrict",
              name: "代理区",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "accountBank",
              name: "开户行",
              span: 6,
              type: "text",
              config: {
                edit: false
              }
            },
            {
              code: "accountBankCode",
              name: "开户行联行号",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "accountBankAddress",
              name: "开户行所在地",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "accountName",
              name: "银行户名",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "accountCode",
              name: "银行账号",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "stateSign",
              name: "状态标识",
              type: "select",
              span: 6,
              config: {
                edit: false,
                options: [
                  { key: "1", value: "未审核" },
                  { key: "2", value: "已审核" }
                ]
              }
            },
            {
              code: "baseUserCode",
              name: "基础用户编码",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            },
            {
              code: "baseUserName",
              name: "基础用户名称",
              type: "text",
              span: 6,
              config: {
                edit: false
              }
            }
          ]
        }
      ],
      editorItems: [
        {
          key: "contactAddress",
          name: "联系地址"
        },
        {

          key: "registerAddress",
          name: "注册地址"
        }
      ]
    }
  }
}
</script>
